<template>
	<view class="contain">
		<uni-list>
			<uni-list-item clickable @click="tiao(item.lineId)" v-for="(item,index) in lineslist"  :key="index" :title="item.lineName" :note="'下一站'+item.nextStep.name">
				<template v-slot:footer>
							<view class="">还有{{item.reachTime}}分钟到站</view>
						</template>
			</uni-list-item>
		</uni-list>
	</view>
</template>
<script>
import {getlinelist} from '@/utils/subway/index.js'
	export default {
		data() {
			return {
				lineslist:[]
			}
		},
		onLoad(){
			this.getlinelis()
		},
		methods: {
			// 跳入详细页面
			tiao(id){
				uni.navigateTo({
					url:"/pages/subwayinfo/subwayinfo?lineId="+id
				})
			},
			async getlinelis(){
				const res= await getlinelist()
				console.log(res)
				this.lineslist=res.data.data
			}
		}
	}
</script>

<style>

</style>
